
/*    This file is part of the managarm operating system.
 *   Copyright (C) 2007, 2008, 2009  Alexander van der Grinten
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>. */

package ast;

import org.managarm.jmanacclib.frontend.korona.KorAstNode;

public class AstAssignment extends KorAstNode {
	public static final int OP_ASSIGN = 1;
	public static final int OP_ADD_ASSIGN = 2;
	public static final int OP_SUB_ASSIGN = 3;
	public static final int OP_MUL_ASSIGN = 4;
	public static final int OP_DIV_ASSIGN = 5;
	public static final int OP_AND_ASSIGN = 6;
	public static final int OP_OR_ASSIGN = 7;
	
	private KorAstNode m_field;
	private KorAstNode m_exp;
	private int m_op;
	
	public AstAssignment(int line, int op, KorAstNode field, KorAstNode exp) {
		super(line);
		
		m_field = field;
		m_exp = exp;
		m_op = op;
	}
	
	public KorAstNode getField() {
		return m_field;
	}
	
	public KorAstNode getExpression() {
		return m_exp;
	}
	
	public int getOperator() {
		return m_op;
	}
}
